﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Imgur.Net.Auth;

namespace Imgur.Net
{
    /// <summary>
    /// Interface defining the signature of operations backed by the Imgur "album" service. This consists primarily of CRUD operations related to a single Album
    /// </summary>
    public interface AlbumProvider
    {
        /// <summary>
        /// Returns an AlbumInfo describing the album identified by the <c>id</c> parameter.
        /// </summary>
        /// <param name="id">Imgur album ID</param>
        /// <returns>AlbumInfo instance containing properties of the image.</returns>
        /// <seealso cref="ImageInfo"/>
        AlbumInfo GetAlbumInfo(string id);

        /// <summary>
        /// Gets a collection of image infos about the images in a given album.
        /// </summary>
        /// <param name="id">The ID of the album to get image info objects for</param>
        /// <returns>IEnumerable collection of ImageInfo objects</returns>
        IEnumerable<ImageInfo> GetAlbumImages(string id);

        /// <summary>
        /// Gets basic info about an image in an album. 
        /// </summary>
        /// <param name="albumId">The ID of the album to query.</param>
        /// <param name="imageId">The ID of the image within the album.</param>
        /// <returns>Image info containg image information.</returns>
        /// <remarks>Any additional actions to be taken on an image can be found in the ImageProvider endpoint.</remarks>
        ImageInfo GetAlbumImageInfo(string albumId, string imageId);

        /// <summary>
        /// Creates a new album using the given image IDs. This method may be called by either anonymous or authenticated users.
        /// </summary>
        /// <param name="imageIds">collection of image IDs that make up the album.</param>
        /// <param name="title">title of the album.</param>
        /// <param name="description">description of the album.</param>
        /// <param name="privacy">privacy level of the album.</param>
        /// <param name="layout">layout style of the album.</param>
        /// <param name="coverImageId">image ID of the album cover image.</param>
        /// <returns>Album info about the album that has been created.</returns>
        AlbumInfo CreateAlbum(IEnumerable<string> imageIds, string title, string description, PrivacyLevel privacy,
            LayoutStyle layout, string coverImageId);

        /// <summary>
        /// Gets or sets the authentication provider used by this class for subsequent requests.
        /// </summary>
        ImgurAuthProvider AuthenticationProvider { get; set; }
    }
}
